<nav class="navbar navbar-expand-xl navbar-dark bg-black">

    <a class="navbar-brand" href="/">{{ navbar.brand }}</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
        aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            {% for item in nav_items %}
            <li class="nav-item {% if item.href == request.url.path %}active{% endif %}">
                <a class="nav-link" href="{{ item.href }}"><i class="fa {{ item.icon }}"></i> {{ item.title }}<span
                        class="sr-only">(current)</span></a>
            </li>
            {% endfor %}
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
                    aria-haspopup="true" aria-expanded="false"><i class="fa {{ dropdown.icon }}"></i> {{ dropdown.title
                    }}</a>
                <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                    {% for item in dropdown_menu %}
                    <a class="dropdown-item" href="{{ item.href }}"> {{ item.title
                        }}</a>
                    {% endfor %}
                    <div class="dropdown-divider"></div>
                    {% for item in dropdown_submenu %}
                    <a class="dropdown-item" href="{{ item.href }}">{{ item.title }}</a>
                    {% endfor %}
                </div>
            </li>
        </ul>
        <form class="form-inline my-2 my-lg-3" onsubmit="searchTable(event)">
            <div class="input-group">
                <div class="input-group-prepend">
                    <span class="input-group-text" id="basic-addon1">
                        <i class="fa fa-search"></i>
                    </span>
                </div>
                <input id="searchTerm" class="custom-search form-control mr-sm-2" type="search"
                    placeholder="Search... CTRL + K" aria-label="Search">
            </div>
            <button onclick="searchTable()" class="btn btn-outline-light my-2 my-sm-0" type="button">Search</button>
        </form>
        <script src="{{ url_for('scripts', path='search.js') }}"></script>

    </div>
</nav>